Select multiple files

Does anyone have an example of selecting multiple files? When I execute the following code, it always gives me an execution error when I "show" the dialogue. Not sure why. I can continue to execute my code as intended even with the error. In addition, the very last line where I print "done deal" does not get executed?? Please forgive the code for being amateur. I am new to creating dialogues.

string file1Name;
string file2Name;
DB selectExportFile;
DB selectXMLFile;
DBE exportFile;
DBE XMLFile;

//Allow the user to select the filenames to parse
selectExportFile = create("Select Livelink Export Text File", styleCentered|styleFixed)
selectXMLFile = create("Select XML File", styleCentered|styleFixed)
void getXMLFile(DB win)
{
file2Name = get(XMLFile)
debug(file2Name);
hide(win);

}
void getExportFile(DB win)
{
file1Name = get(exportFile)
debug(file1Name);

hide(win);
XMLFile = fileName(selectXMLFile)
apply(selectXMLFile, "OK", getXMLFile)
//noError();
show selectXMLFile
//lastError();
}
//open a browse window that will allow the user to select a file
exportFile = fileName(selectExportFile)
apply(selectExportFile, "Next", getExportFile)
show selectExportFile;

debug("done deal")
lsand - Wed Aug 17 13:23:37 EDT 2011

Re: Select multiple files
llandale - Wed Aug 17 15:15:31 EDT 2011

I added function at the top:
... void debug(string s){ print s "\n" }
and it worked, 1st dialog invoked the 2nd one OK. Cannot see why it would fail for you.
Is it possible you have "debug" defined in some top context or something?

DXL Execution STOPS after a "show" command. There is no mechansim for continuing after the show; when a callback function ends, nothing happens. This is different from a "block" which will execute after the "release".

show(db)
infoBox("Louie doesn't know what he's talking about")

  • Louie

Your "hide(win)" should be followed by "destroy(win)".

selectXMLFile = create("Select XML File", styleCentered|styleFixed)
should be in function "getExportFile".

Re: Select multiple files
lsand - Wed Aug 17 17:40:41 EDT 2011

llandale - Wed Aug 17 15:15:31 EDT 2011
I added function at the top:
... void debug(string s){ print s "\n" }
and it worked, 1st dialog invoked the 2nd one OK. Cannot see why it would fail for you.
Is it possible you have "debug" defined in some top context or something?

DXL Execution STOPS after a "show" command. There is no mechansim for continuing after the show; when a callback function ends, nothing happens. This is different from a "block" which will execute after the "release".

show(db)
infoBox("Louie doesn't know what he's talking about")

  • Louie

Your "hide(win)" should be followed by "destroy(win)".

selectXMLFile = create("Select XML File", styleCentered|styleFixed)
should be in function "getExportFile".

Thanks for the corrections. The code works properly, but every time I "show" I get the following error in the output window:
"progress Waiting for user input on window: "Select Livelink Export Text File - DOORS"
-R-E- DXL: <C:\Users\LEILAN~1.KAS\AppData\Local\Temp\temp_3203611068660082503_test.dxl:42> An unexpected error has occurred.
-I- DXL: execution halted
"

Again, it continues execution, but then when it gets to the second "show" command, I get another one of those errors you see above...and again it continues execution to the end.

Re: Select multiple files
llandale - Thu Aug 18 16:00:26 EDT 2011

lsand - Wed Aug 17 17:40:41 EDT 2011
Thanks for the corrections. The code works properly, but every time I "show" I get the following error in the output window:
"progress Waiting for user input on window: "Select Livelink Export Text File - DOORS"
-R-E- DXL: <C:\Users\LEILAN~1.KAS\AppData\Local\Temp\temp_3203611068660082503_test.dxl:42> An unexpected error has occurred.
-I- DXL: execution halted
"

Again, it continues execution, but then when it gets to the second "show" command, I get another one of those errors you see above...and again it continues execution to the end.

new to me. Perhaps you have "show(DB)" somewhere defined.

Re: Select multiple files
Mathias Mamsch - Thu Aug 18 17:17:29 EDT 2011

lsand - Wed Aug 17 17:40:41 EDT 2011
Thanks for the corrections. The code works properly, but every time I "show" I get the following error in the output window:
"progress Waiting for user input on window: "Select Livelink Export Text File - DOORS"
-R-E- DXL: <C:\Users\LEILAN~1.KAS\AppData\Local\Temp\temp_3203611068660082503_test.dxl:42> An unexpected error has occurred.
-I- DXL: execution halted
"

Again, it continues execution, but then when it gets to the second "show" command, I get another one of those errors you see above...and again it continues execution to the end.

Chances are that you are using the Sodius DXL editor in Debug mode. I know a little about the internals of that thing (since I made the debugger core). The reason why you get beyond the show in debug mode is, that the debugger will replace show by block to keep the DXL program running. It is a known "bug" that execution will continue after show in debug mode, although, you are not supposed to have any code after show, therefore usually that is not a serious problem.

What Debugger version are you using? On my system (2.0.5) the code runs without error. I remember some problems with GUI debugging in earlier versions of the debugger, but we fixed those. Try running the program in normal mode (not debug). Do you use any other code? Can you post a complete example that will crash (including the code for 'debug') together with your debugger version?

Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Select multiple files
lsand - Mon Aug 22 16:39:09 EDT 2011

Mathias Mamsch - Thu Aug 18 17:17:29 EDT 2011
Chances are that you are using the Sodius DXL editor in Debug mode. I know a little about the internals of that thing (since I made the debugger core). The reason why you get beyond the show in debug mode is, that the debugger will replace show by block to keep the DXL program running. It is a known "bug" that execution will continue after show in debug mode, although, you are not supposed to have any code after show, therefore usually that is not a serious problem.

What Debugger version are you using? On my system (2.0.5) the code runs without error. I remember some problems with GUI debugging in earlier versions of the debugger, but we fixed those. Try running the program in normal mode (not debug). Do you use any other code? Can you post a complete example that will crash (including the code for 'debug') together with your debugger version?

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

I'm using DXL Editor 2.0 . I believe I was running in normal mode by selecting Run As -> DXL. I no longer get the error, not sure why. The code hasn't changed from what I posted earlier aside from what Louie already pointed out in that the debug function was missing:

void debug(string s)
{
print s "\n";
}

Re: Select multiple files
Mathias Mamsch - Mon Aug 22 16:52:18 EDT 2011

lsand - Mon Aug 22 16:39:09 EDT 2011
I'm using DXL Editor 2.0 . I believe I was running in normal mode by selecting Run As -> DXL. I no longer get the error, not sure why. The code hasn't changed from what I posted earlier aside from what Louie already pointed out in that the debug function was missing:

void debug(string s)
{
print s "\n";
}

There is an option, which tells Eclipse to launch Debug Mode always, when a breakpoint is set. See this post:
http://dxleditor.com/forum/start_dxleditor_without_debug_feature

Maybe you removed breakpoints and therefore no longer launch in debug mode. If you explicitly launch in debug mode, do you get the error again? If so and if the error does not occur in normal mode, could you file a bug report with sodius? Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Select multiple files
lsand - Mon Aug 22 17:57:53 EDT 2011

Mathias Mamsch - Mon Aug 22 16:52:18 EDT 2011
There is an option, which tells Eclipse to launch Debug Mode always, when a breakpoint is set. See this post:
http://dxleditor.com/forum/start_dxleditor_without_debug_feature

Maybe you removed breakpoints and therefore no longer launch in debug mode. If you explicitly launch in debug mode, do you get the error again? If so and if the error does not occur in normal mode, could you file a bug report with sodius? Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

I can't even run in debug mode, it says I need a pro license?